import { Component, OnInit } from '@angular/core';

import { RoutingJumpService } from '../../core/service/routing-jump.service';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {

  constructor(private routingJumpService: RoutingJumpService) {
  }

  problems = [
    {
      name: '三数之和',
      path: 'test/3Sum'
    },
    {
      name: '四数之和',
      path: 'test/4Sum'
    },
    {
      name: '最长公共前缀',
      path: 'test/longestCommonPrefixComponent'
    }
  ];

  ngOnInit() {
  }

  skip(path: string) {
    this.routingJumpService.path(path);
  }


}
